<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>主页</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="../lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="../css/public.css" media="all">
</head>
<style>
    .layui-top-box {padding:40px 20px 20px 20px;color:#fff}
    .panel {margin-bottom:17px;background-color:#fff;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}
    .panel-body {padding:15px}
    .panel-title {margin-top:0;margin-bottom:0;font-size:14px;color:inherit}
    .label {display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;margin-top: .3em;}
    .layui-red {color:red}
    .main_btn > p {height:40px;}
</style>
<body>
<div class="layuimini-container" id="base">
    <div class="layuimini-main layui-top-box">
        <div class="layui-row layui-col-space25">
            <div class="layui-col-md6" style="padding-left: 5%;">
					<div class="layui-col-md10" style="margin-bottom: 2%;">
				        <div class="col-xs-6 col-md-3">
				            <div class="panel layui-bg-cyan">
				                <div class="panel-body">
				                    <div class="panel-title">
				                        <span class="label pull-right layui-bg-blue">实时</span>
				                        <h3>召回单统计</h3><br/>
				                    </div>
				                    <div class="panel-content">
				                        <h1 class="no-margins">{{initNum.backNoNum}}</h1>
				                        <div class="stat-percent font-bold text-gray"></div>
				                        <small ><i class="fa fa-commenting"></i> 当前未处理召回单记录</small><br/>
				                    </div>
				                </div>
				            </div>
				        </div>
				    </div>
				
				    <div class="layui-col-md10" style="margin-bottom: 2%;">
				        <div class="col-xs-6 col-md-3">
				            <div class="panel layui-bg-blue">
				                <div class="panel-body">
				                    <div class="panel-title">
				                        <span class="label pull-right layui-bg-cyan">实时</span>
				                        <h3>召回单统计</h3><br/>
				                    </div>
				                    <div class="panel-content">
				                        <h1 class="no-margins">{{initNum.backYesNum}}</h1>
				                        <div class="stat-percent font-bold text-gray"></div>
				                        <small><i class="fa fa-commenting"></i>累计处理召回单记录数</small><br/>
				                    </div>
				                </div>
				            </div>
				        </div>
				    </div>
				
				    <div class="layui-col-md10" style="margin-bottom: 2%;">
				        <div class="col-xs-6 col-md-3">
				            <div class="panel layui-bg-green">
				                <div class="panel-body">
				                    <div class="panel-title">
				                        <span class="label pull-right layui-bg-orange">实时</span>
				                        <h3>商品统计</h3><br/>
				                    </div>
				                    <div class="panel-content">
				                        <h1 class="no-margins">{{initNum.myProudctNum}}</h1>
				                        <div class="stat-percent font-bold text-gray"></div>
				                        <small><i class="fa fa-commenting"></i> 当前累计发布商品</small><br/>
				                    </div>
				                </div>
				            </div>
				        </div>
				    </div>
				    <div class="layui-col-md10" style="margin-bottom: 2%;">
				        <div class="col-xs-6 col-md-3">
				            <div class="panel layui-bg-orange">
				                <div class="panel-body">
				                    <div class="panel-title">
				                        <span class="label pull-right layui-bg-green">实时</span>
				                        <h3>用户统计</h3><br/>
				                    </div>
				                    <div class="panel-content">
				                        <h1 class="no-margins">{{initNum.allUserNum}}</h1>
				                        <div class="stat-percent font-bold text-gray"> </div>
				                        <small><i class="fa fa-commenting"></i>本系统累计注册用户</small><br/>
				                    </div>
				                </div>
				            </div>
				        </div>
				    </div>
				</div>
				
				
				<div class="layui-col-md5" style=" background-color:#e2e2e2;border-radius:10px;padding-left: 3%;padding-top: 2%;margin-top: 1%;">
					<div class="layui-box">
					    <div class="layui-row layui-col-space10  layui-col-space30" >         
					        <div class="layui-col-md12">
					            <ul class="layui-timeline" >
									<li class="layui-timeline-item">
									    <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
									    <div class="layui-timeline-content layui-text">
									        <h2 class="layui-timeline-title">商品发货记录</h2><hr/>					        
									    </div>
									</li>
					                <li class="layui-timeline-item" v-for="item in productList">
					                    <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
					                    <div class="layui-timeline-content layui-text">
					                        <h2 class="layui-timeline-title">{{item.pname}} -- {{item.shipping}}</h2>
					                        <p style="font-size: initial;">
					                            商品类别：{{item.ptype}}
					                            <br>采摘时间：{{item.picking}}
					                            <br>目的地：{{item.destination}}
					                        </p>
					                    </div>
					                </li>                    
					            </ul>
					        </div>			
					    </div>
					</div>
				</div>					
			</div>
												
    </div>


    
		
</div>
<script src="../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="../js/vue.js" charset="utf-8"></script>
<script src="../js/axios.js" charset="utf-8"></script>
<script src="../js/my.js" charset="utf-8"></script>
<script>
	var base = new Vue({
		el: "#base",
		data: {
			uid : $('#uid',parent.document).text(),
			initNum : {},
			productList : {}
		},
		created:function(){
			axios.get(globalAddress+"/default/initNum/"+this.uid).then((response) => {
			  console.log(response.data);
			  this.initNum = response.data.data;
			});
			axios.get(globalAddress+"/default/getproductorder/"+this.uid).then((response) => {
			  console.log(response.data);
			  this.productList = response.data.data;
			});
		},
		
	});
		
</script>

</body>
</html>